package cn.lyf.conf;

import org.springframework.beans.factory.FactoryBean;

import cn.lyf.bean.Bean0;

public class MyFactoryBean implements FactoryBean<cn.lyf.bean.Bean0>   {
    //注入后，getBean时调用此方法
    //加上&获取 FactoryBean 本身
    @Override
    public Bean0 getObject() throws Exception {
        return new cn.lyf.bean.Bean0();
    }

    @Override
    public Class<?> getObjectType() {
        return cn.lyf.bean.Bean0.class;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
    
}
